// pages/photo/image.js
Page({
  data: {
    item: '',
    name: '',
    type: [ '可回收垃圾', '有害垃圾', '厨余垃圾', '其他垃圾']
  },

  onLoad: function (options) {
    console.log(options);
    //将字符串转成json
    let msg = JSON.parse(options.datamsg);
    console.log(msg);
    var that = this
    this.setData({
      item: msg.list
    })
  },

  onReady: function () {

  },
  onShow: function () {

  },
  onHide: function () {

  },

  onUnload: function () {

  },

  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  onShareAppMessage: function () {

  },

  back: function(e) {
    wx.navigateBack({
      delta: 1
    });
  }
})